<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%
	String contextPath = request.getContextPath();
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="<%=contextPath%>/openSources/layui/css/layui.css">
<title>用户登录</title>
</head>
<body>
<div class="layui-container" style="margin-top:150px;">
	<div class="layui-row">
		<div class="layui-col-md6 layui-col-md-offset3">
			<div class="layui-colla-item" style="border: 1px solid #C9C9C9">
			    <h4 class="layui-colla-title" style="padding-left: 20px;">用户登录</h4>
			    <div class="layui-colla-content layui-show">
			    	<form class="layui-form" action="login" method="post">
			    		<div class="layui-form-item">
			    			<label class="layui-form-label">用户名</label>
			    			<div class="layui-input-block">
			    				<input type="text" name="userName"  placeholder="请输入用户名" class="layui-input"/>
			    			</div>
			    		</div>
			    		<div class="layui-form-item">
			    			<label class="layui-form-label">密码</label>
			    			<div class="layui-input-block">
			    				<input type="password" name="password" placeholder="请输入密码" class="layui-input"/>
			    			</div>
			    		</div>
			    		<div class="layui-form-item">
			    			<label class="layui-form-label">记住我</label>
			    			<div class="layui-input-inline" style="width: 60px;">
			    				<input type="checkbox" name="rememberMe" value="1" lay-skin="switch" lay-text="开启|关闭">
			    			</div>
			    			<div class="layui-form-mid layui-word-aux"><label style="color: red;">在公共场合不要开启记住我功能<label</div>
			    		</div>
			    		<div class="layui-form-item">
			    			<div class="layui-input-block">
			    				${error }
			    			</div>
			    		</div>
			    		
			    		<div class="layui-form-item">
			    			<div class="layui-input-block">
			    				<button type="submit" class="layui-btn">登录</button>
			    				<button type="reset" class="layui-btn layui-btn-primary">重置</button>
			    			</div>
			    		</div>
			    	</form>
			    </div>
			  </div>
		</div>
	</div>
</div>

<script type="text/javascript" src="<%=contextPath%>/openSources/layui/layui.js"></script>
<script type="text/javascript">
layui.use("form",function(){
	//判断登录页面是否是在iframe里面
	if(self!=top){  
	    parent.window.location.replace(window.location.href);  
	}
});
</script>
</body>
</html>